<?php
//设置字符集
header('content-type:text/html;charset=utf-8');
//定义后台台相关常量
define('APP_DEBUG',true);//调试开关
ini_set('display_errors',APP_DEBUG);//开启调试时，显示错误
define('COMMON_PATH','../../common/');//公共文件目录
define('UPLOAD_PATH','../../upload/');//上传文件目录
define('BS_PATH','../../public/bs/'); //bootstrop文件目录

//载入数函数库
require COMMON_PATH.'function.php';
//载入数据库函数
require COMMON_PATH.'link_mysql.php';
//载入模板
//require COMMON_PATH.'module.php';
session_start();
if(!isset($_SESSION['cms'])){
	$_SESSION=['cms'=>[]];	
}
if(!defined('NO_CHECK_LOGIN')){
	if(isset($_SESSION['cms']['admin'])){
		$user=$_SESSION['cms']['admin'];
	}else{
		echo "<script>alert ('浏览此页，需要先登录');</script>";;
		redirect('../view/login.html');
	}
}
?>